<!DOCTYPE html>
<html xmlns:v-bind="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8">
    <title>style绑定</title>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>

<body>
<div id="app" v-bind:title="title">

    <div v-bind:style='{color:fontColor,fontSize:fontSize}'>{{msg}}</div>
    <div v-bind:style='styleObj'>{{msg}}</div>
    <div v-bind:style=[styleObj,styleObj2]>{{msg}}</div>
    <div v-bind:style=[styleObj2,styleObj]>{{msg}}</div>
</div>


</body>


<script>
    var app = new Vue({
        el: '#app',
        data: {
            msg: 'hhh',
            fontColor: 'red',
            fontSize: '30px',
            styleObj: {
                color: 'green',
                fontSize: '30px'
            },
            styleObj2: {
                color: 'purple',
                border:'2px solid #FFF602'
            }
        },

    })

</script>
</html>
